/**
 * Created by CL on 2017/4/21.
 */
$(".post").click(function () {
        $.ajax(
            {
                type:"post",
                url:"http://127.0.0.1:4000/processpost",
                dataType:"json",
                data:{
                    first_name:$(".first_name").val(),
                    last_name:$(".last_name").val()
                },
                success:function (data) {
                    console.log(data)
                },
                error:function (XMLHttpRequest, textStatus, errorThrown) {
                    console.log(XMLHttpRequest, textStatus, errorThrown)
                }
            }

        )
}

)

$(".get").click(function () {
        $.ajax(
            {
                type:"get",
                url:"http://127.0.0.1:4000/processget",
                dataType:"json",
                data:{
                    username:$(".user_name").val()
                },
                success:function (data) {
                    console.log(data)
                },
                error:function (XMLHttpRequest, textStatus, errorThrown) {
                    console.log(XMLHttpRequest, textStatus, errorThrown)
                }
            }

        )
    }

)